﻿#!/bin/sh
#自动改mac
#hao_ 
mac=`openssl rand -hex 6 | sed -E "s/(..)/\1:/g; s/:$//"`
echo hwaddress ether $mac>/root/xy.txt
sed -i "7s/.*/`sed -ne 1p /root/xy.txt`/" /etc/network/interfaces